//初始化图形
function createBlock() {
	var activeBlock = null;
	//生成一个0到6之间随机数 
	var t = Math.floor(Math.random() * 7);
	//7中图形，每种4个方块，每个方块水平和垂直坐标共8个坐标
	//以下坐标2个一对(0,4)代表第一个方块所处的格子为(第一行，第五列)
	var arr7 = "0,4,1,4,0,5,1,5;0,3,0,4,0,5,0,6;0,5,1,4,1,5,2,4;0,4,0,5,1,5,1,6;0,4,1,4,2,4,2,5;0,5,1,5,2,4,2,5;0,5,1,4,1,5,1,6"
	var arr = arr7.split(";")
	activeBlock = arr[t].split(","); //当前活动块（7个中的一个）
	for(var i = 0; i < 8; i++) {
		activeBlock[i] = parseInt(activeBlock[i]); //把字符串值改成数值
	}
	return activeBlock;
}

